<template>
	<view class='container bg-w'>
		<view class="header uni-flex uni-row flex-between">
			<uni-nav-bar title="维护记录详情">
				<template slot='left'>
					<view class="flex width-100">
						<i class='iconfont iconfanhui' @click='goBack()'></i>
					</view>
				</template>
			</uni-nav-bar>
		</view>
		<view class="position-r-top">
			<view class="main">
				<uni-list>
					<view>
						<text class="order">基础信息</text>
						<view class="">
							<uni-list-item class="" title="维护任务名称" :rightText="whMaintainProject.taskName"></uni-list-item>
							<uni-list-item class="" title="项目名称" :rightText="whMaintainProject.projectName"></uni-list-item>
							<uni-list-item class="" title="维护单位" :rightText="whMaintainProject.orgName"></uni-list-item>
							<uni-list-item class="" title="维护人员" :rightText="whMaintainProject.maintainUserNames"></uni-list-item>
							<uni-list-item class="" title="截至时间" :rightText="whMaintainProject.planCompleteTime"></uni-list-item>
							<uni-list-item class="" title="维护结果" :rightText="whMaintainProject.maintainResultDesc"></uni-list-item>
						</view>
					</view>
					<view>
						<uni-collapse :accordion="false" v-if="whMaintainProject.maintainPointVos">
							<uni-collapse-item v-for="(item,index) in whMaintainProject.maintainPointVos" :key="index" :title="item.subProjectName" :showAnimation="true">
								<view class="">
									<uni-list-item v-for="(itemChild,index) in item.maintainPointVos" class="" :title="itemChild.gaugingPoint" :to="'/pages/Application/MaintainAudit/MaintenanceDetail/ProjectReport/ProjectReport?subPorjectId='+itemChild.subPorjectId+'&standardProId='+itemChild.standardProId+'&gaugingPoint='+itemChild.gaugingPoint+'&maintainTaskId='+maintainTaskId"></uni-list-item>
								</view>
							</uni-collapse-item>
						</uni-collapse>
					</view>
				</uni-list>
			</view>
		</view>
	</view>
</template>

<script>
	import {getProject} from "@/common/api/MaintainAudit.js"
	import {findSubProjects} from "@/common/api/MaintainReport.js"
	import ipConfig from '@/utils/ipconfig.js'
	export default {
		data() {
			return {
				whMaintainProject:{},
				maintainTaskId:''
			}
		},
		onLoad(params) {
			this.maintainTaskId =params.maintainTaskId;
			this.loadChildProductList()
		},
		methods: {
			loadChildProductList(){
				findSubProjects(this.maintainTaskId).then((res)=>{
					if(res.data){
						this.whMaintainProject = res.data;
						console.log('维护记录详情',this.whMaintainProject)
					}
				})
			},
		}
	}
</script>

<style lang="less" scoped>
	.main {
		height: 100%;
		flex: 1;
		padding-bottom: 106rpx;
		overflow: scroll;
	}
	/deep/.uni-collapse .uni-list-cell {
		padding-left: 0 !important;
	}

	/deep/.uni-collapse-cell--open[data-v-8f47561c] {
		background-color: #fff;

	}
	/deep/.uni-collapse-cell[data-v-8f47561c] {
		border-color: #fff;
	}
	/deep/.uni-collapse-cell__title-text {
		text-indent: 20rpx;
	}
	/deep/.uni-collapse-cell__title-text::before{
		content: '';
		position: absolute;
		top: 50%;
		left: 2%;
		width: 10rpx;
		height: 30rpx;
		border-radius: 4rpx;
		transform: translateY(-50%);
		background-color: #09AAE9;
	}
	.form-list,.photograph {
		padding: 0 3%;
		background-color: #fff;
	}
	uni-input {
		height: 100rpx;
		line-height: 100rpx;
		text-align: right;
		font-size: 28rpx;
		min-width: 60%;
		max-width: 80%;
		color: #666 !important
	}
	/deep/uni-button:after {
		border: none;
		border-radius: none;
	}
	.img_box {
		width: 48%;
		position: relative;
	}
	/deep/.photograph .photo-list uni-image{
		width: 100% !important;
		height: 220rpx;
	
	}
	
	.photograph-list {
		color: #666;
	}
	
	.img_box uni-icon {
		position: absolute;
		top: 10rpx;
		right: 10rpx;
	}
	
	/deep/.img_box uni-icon .uni-icon-cancel {
		color: #fff;
	}
	.construction-footer {
		width: -webkit-fill-available;
		height: 100rpx;
		display: flex;
		position: fixed;
		bottom: 0;
	
		button {
			font-size: 28rpx;
			color: #fff;
			width: 50%;
			line-height: 100rpx;
			border-radius: 0;
		}
	
		button:first-child {
			background-color: #fff;
			color: #000;
			border-right: 1px solid #fff;
		}
	
		button:last-child {
			background-color: #09AAE9;
		}
	}
</style>
